package com.dq.service.sys.user;

import com.dq.controller.in.request.UserSchedulingRequest;
import com.dq.controller.in.user.SysUserQuery;
import com.dq.exception.customException.AdminException;
import com.dq.controller.in.user.BossUserQuery;
import com.dq.domain.org.Org;
import com.dq.domain.sys.role.SysRole;
import com.dq.domain.sys.user.user.BossUser;
import com.dq.domain.sys.user.user.base.SysUser;
import com.dq.vo.Vo;
import com.google.gson.Gson;

import java.util.List;

/**
 * @author liuhui
 * @date 2019/12/3 0003 10:59:10
 */
public interface BossUserService {
    List<BossUser> list(BossUserQuery bossUserQuery)throws AdminException;
    Long count(BossUserQuery bossUserQuery)throws AdminException;


    public List<BossUser> getBossUserListByRoles(SysUserQuery sysUserQuery, int... index);
    public long getBossUserCountByRoles(SysUserQuery sysUserQuery, int... index);

    /**
     * 获取 负责 本门店 的所有boss
     */
    public List<BossUser> getBossByOrg(Org org);


    /**
     * 获取用户所有角色 集合
     */
    public List<SysRole> getRolesByUser(SysUser user);

    /**
     * 获取 用户所有角色 code 集合
     */
    public List<String> getRoleCodesByUser(SysUser user);

    /**
     * boss 子账号添加
     */
    public BossUser saveBossUserSon(BossUser bossUserAdd) throws AdminException;


    public BossUser initObject(BossUser bossUser) throws AdminException;
    public BossUser update(BossUser bossUser) throws AdminException;
    public BossUser save(BossUser bossUser) throws AdminException;

    public Gson getGson();

    public Vo userScheduling(UserSchedulingRequest userSchedulingRequest) throws AdminException;

    Vo dismiss(Long id) throws AdminException;

    Vo transfer(Long id,Long orgId) throws AdminException;
}
